#include<bits/stdc++.h>
using namespace std;

void kuaisu(vector<int>& v, int s, int e) {
    if (s >= e) return;
    int mid = v[(s + e) / 2];
    int l = s;
    int r = e;
    while (l <= r) {
        while (v[l] < mid) l++;
        while (v[r] > mid) r--;
        if (l <= r) {
            swap(v[l], v[r]);
            l++;
            r--;
        }
    }
    kuaisu(v, s, r);
    kuaisu(v, l, e);
}

int main() {
    int n;
    cin >> n;
    vector<int> v(n);
    for (int i = 0; i < n; i++) {
        cin >> v[i];
    }
    kuaisu(v, 0, n - 1);
    for (int i = 0; i < n; i++) {
        if (i < n - 1) cout << v[i] << " ";
        else cout << v[i];
    }
    return 0;
}